#include "eventmanagementtest.h"
using namespace sp_core;

CPPUNIT_TEST_SUITE_REGISTRATION (QueueTests);

void QueueTests::setUp()
{
	
}

void QueueTests::tearDown()
{

}


void QueueTests::emptyPeekTest()
{
	Queue<int*> queue;
	queue.Peek();
}

void QueueTests::emptyPullTest()
{
	Queue<int*> queue;
	queue.Pull();
}

void QueueTests::peekTest()
{
	Queue<int*> queue;
	int* f = new int;
	*f = 5;
	queue.Push(f);
	CPPUNIT_ASSERT(queue.Peek() == f);
}

void QueueTests::pushPullTest()
{
	Queue<int*> queue;
	int* f = new int;
	*f = 42;
	queue.Push(f);
	CPPUNIT_ASSERT(queue.Pull() == f);
}

void QueueTests::pushNullTest()
{
	Queue<int*> queue;
	int* f = NULL;;
	queue.Push(f);
}

void QueueTests::concurrencyTest()
{
	// Close your eyes here Henrik & CMO!!!
	CPPUNIT_ASSERT(true);
}


